//
//  WFInformationDescriptionCell.m
//  谷居
//
//  Created by dllo on 16/6/30.
//  Copyright © 2016年 刘万方. All rights reserved.
//

#import "WFInformationDescriptionCell.h"

@implementation WFInformationDescriptionCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createCell];
    }
    return self;
}

- (void)createCell {
    _label = [[WFLabel alloc] init];
    [self.contentView addSubview:_label];
    [_label release];
    _label.font = [UIFont systemFontOfSize:14];
}



- (void)layoutSubviews {
    [super layoutSubviews];
    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:14], NSFontAttributeName, nil];
    CGRect rect = [_label.text boundingRectWithSize:CGSizeMake(SCREEN_WIDTH, 0) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    _label.frame = CGRectMake(0, 0, self.contentView.frame.size.width, rect.size.height);
    _label.numberOfLines = 0;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
